{% from "devhub/addons/listing/macros.html" import dev_heading, dev_item_info %}
{% set collection = collection or None %}
{% for addon in addons %}
  <div class="item addon ignore-compatibility" data-addonid="{{ addon.id }}">
    <div class="info {{ amo.ADDON_TYPE_CHOICES_API.get(addon.type) }}">
      {{ dev_heading(addon, amo) }}
      {% if addon.status == amo.STATUS_NULL and not addon.has_complete_metadata() %}
        <p class="incomplete">
          {{ _('This add-on is missing some required information before it can be submitted for publication.') }}
        </p>
      {% elif addon.status == amo.STATUS_NULL and not addon.has_unlisted_versions() and not addon.has_listed_versions() %}
        <p class="incomplete">
          {{ _("This add-on doesn't have any versions.")}}
        </p>
      {% else %}
        {% if addon.status != amo.STATUS_NULL or addon.has_listed_versions() %}
          <div class="item-info">
            {{ dev_item_info(addon, amo) }}
          </div>
        {% endif %}
        <ul class="item-details">
          {% include "devhub/includes/addon_details.html" %}
        </ul>
      {% endif %}
      <div class="item-actions">
        {% include "devhub/addons/listing/item_actions.html" %}
      </div>
    </div>
  </div>
{% endfor %}
